#pragma once
#include"LogLevel.hpp"
#include"Utility.hpp"
#include<thread>
#include<iostream>
#include<string>
// 日志消息类的定义：1、等级 2、时间、3、文件、4、行号、5、线程id 6、消息主体 7、日志器

namespace ldcLOG
{
    struct Message
    {
        time_t time_;
        ldcLOG::LogLevel::Level level_;
        std::string file_;
        size_t line_;
        std::thread::id tid_;
        std::string logger_;
        std::string payload_;
        Message(ldcLOG::LogLevel::Level level,
        const std::string& file,
        const size_t& line,
        const std::string&logger,
        const std::string&message)
        :time_(ldcLOG::Utility::Date::GetTime()),
        level_(level),file_(file),line_(line),
        tid_(std::this_thread::get_id()),logger_(logger),
        payload_(message)
        {

        }
    };
}